home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume22 / nn6.4 / part21 < prev    next >
Encoding:
Internet Message Format  |  1990-06-07  |  54.7 KB

  1. Subject:  v22i055:  NN Newsreader, release 6.4, Part21/21
  2. Newsgroups: comp.sources.unix
  3. Approved: rsalz@uunet.UU.NET
  4. X-Checksum-Snefru: 3a5fcde9 de754474 a8ece4e1 121f94b6
  5.  
  6. Submitted-by: "Kim F. Storm" <storm@texas.dk>
  7. Posting-number: Volume 22, Issue 55
  8. Archive-name: nn6.4/part21
  9.  
  10. #! /bin/sh
  11. # This is a shell archive.  Remove anything before this line, then feed it
  12. # into a shell via "sh file" or similar.  To overwrite existing files,
  13. # type "sh file -c".
  14. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  15. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  16. # Contents:  Makefile articles.h conf/m-convex.h conf/m-template.h
  17. #   conf/s-hpux6-5.h conf/s-sgi4D.h conf/s-xenix386.h format.awk
  18. #   help/help.extended help/help.map help/help.menu help/help.more
  19. #   help/help.sort inews/README man/nnpost.1 man/nnspew.8
  20. #   man/nnstats.1m man/nntidy.1 man/nnusage.1m menu.h news.h nnmail.c
  21. #   options.h pack_subject.c proto.h routes.sample term.h vararg.h
  22. # Wrapped by storm@texas.dk on Sun May  6 18:20:25 1990
  23. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  24. echo If this archive is complete, you will see the following message:
  25. echo '          "shar: End of archive 21 (of 22)."'
  26. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  27.   echo shar: Will not clobber existing file \"'Makefile'\"
  28. else
  29.   echo shar: Extracting \"'Makefile'\" \(2021 characters\)
  30.   sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  31. X#
  32. X# Makefile for nn release 6.4
  33. X#
  34. X# Specify your favourite compiler, preprocessor, and compiler flags:
  35. X#
  36. X# Some alternatives for CPP might be /lib/cpp and $(CC) -P
  37. X# Common values for CFLAGS are '-O -s' or '-g'
  38. X#
  39. X
  40. XCC =        cc
  41. XCPP =        $(CC) -E
  42. XCFLAGS =    -g
  43. XMAKE =        make
  44. X
  45. X#
  46. X# Before compiling, read the instructions in the file INSTALLATION!
  47. X# -----------------------------------------------------------------
  48. X#
  49. X#    make all    compile programs
  50. X#    make install    install programs
  51. X#    make initdb    initialize database
  52. X#    make clean    remove all make'd files from source directory
  53. X#
  54. X# no changes are needed below this line
  55. X#
  56. X
  57. XSHELL = /bin/sh
  58. X
  59. Xall: ymakefile
  60. X    $(MAKE) $(MFLAGS) -f ymakefile all
  61. X
  62. Xtouch: ymakefile
  63. X    $(MAKE) -f ymakefile -t all
  64. X
  65. Xdbg: ymakefile
  66. X    $(MAKE) $(MFLAGS) -f ymakefile nn1
  67. X
  68. Xnn: ymakefile
  69. X    $(MAKE) $(MFLAGS) -f ymakefile nn
  70. X
  71. Xmaster: ymakefile
  72. X    $(MAKE) $(MFLAGS) -f ymakefile master
  73. X
  74. Xlint: ymakefile
  75. X    $(MAKE) -f ymakefile lint
  76. X
  77. Xinstall: ymakefile
  78. X    $(MAKE) $(MFLAGS) -f ymakefile install
  79. X
  80. Xinitdb: ymakefile
  81. X    $(MAKE) $(MFLAGS) -f ymakefile initdb
  82. X
  83. Xonline: ymakefile
  84. X    $(MAKE) $(MFLAGS) -f ymakefile online.manual
  85. X
  86. Xclient: ymakefile
  87. X    $(MAKE) $(MFLAGS) -f ymakefile client
  88. X
  89. Xinstall.client: ymakefile
  90. X    $(MAKE) $(MFLAGS) -f ymakefile install.client
  91. X
  92. Xymakefile: Makefile xmakefile config.h
  93. X    cp xmakefile MF.c
  94. X    $(CPP) -DCOMPILER="$(CC)" -DPREPROC="$(CPP)" \
  95. X           -DCDEBUG="$(CFLAGS)" -Iconf MF.c | \
  96. X    sed -e '1,/MAKE WILL CUT HERE/d' \
  97. X        -e '/^#/d' \
  98. X        -e '/^[ \f    ]$$/d' \
  99. X        -e '/^[ /]*[*]/d' | \
  100. X    sed -n -e '/^..*$$/p' > ymakefile
  101. X    rm -f MF.c
  102. X
  103. X#
  104. X# clean up
  105. X#    Will remove object and executeable files.
  106. X#
  107. X
  108. Xclean:    ymakefile
  109. X    make -f ymakefile clean
  110. X    rm -f *.o *~ ymakefile
  111. X
  112. X#
  113. X# distribution
  114. X#
  115. X
  116. Xdistrib: man/nn.1.D
  117. X    [ -d DIST ] || mkdir DIST
  118. X    rm DIST/Part.*
  119. X    makekit -m -k30 -s55000 -nDIST/Part.
  120. X
  121. Xtar: man/nn.1.D
  122. X    chmod +x FILES
  123. X    rm -f /tmp/nn64tar*
  124. X    tar cf /tmp/nn64tar `FILES`
  125. X    cd /tmp && compress nn64tar
  126. X
  127. Xsplit: tar
  128. X    rm -f /tmp/nn64z*
  129. X    cd /tmp && bsplit -b40000 -pnn64z -v < nn64tar.Z
  130. X
  131. Xman/nn.1.D: man/nn.1
  132. X    sh SPLITNN1
  133. X    
  134. END_OF_FILE
  135.   if test 2021 -ne `wc -c <'Makefile'`; then
  136.     echo shar: \"'Makefile'\" unpacked with wrong size!
  137.   fi
  138.   # end of 'Makefile'
  139. fi
  140. if test -f 'articles.h' -a "${1}" != "-c" ; then 
  141.   echo shar: Will not clobber existing file \"'articles.h'\"
  142. else
  143.   echo shar: Extracting \"'articles.h'\" \(1431 characters\)
  144.   sed "s/^X//" >'articles.h' <<'END_OF_FILE'
  145. X/*
  146. X *    (c) Copyright 1990, Kim Fabricius Storm.  All rights reserved.
  147. X *
  148. X *    Memory handling
  149. X */
  150. X
  151. X/* article headers */
  152. X
  153. Xarticle_number    n_articles;
  154. Xarticle_header     **articles;
  155. X
  156. X
  157. Xtypedef struct thunk {
  158. X    char      *this_thunk;
  159. X    struct thunk  *next_thunk;
  160. X    long      thunk_size;
  161. X} thunk;
  162. X
  163. X
  164. Xtypedef struct {
  165. X    thunk *sm_cur_t;
  166. X    int      sm_size;
  167. X    char  *sm_next;
  168. X} string_marker;
  169. X
  170. X
  171. Xtypedef struct {
  172. X    string_marker mm_string;
  173. X    thunk *mm_cur_t;
  174. X    int      mm_size;
  175. X    article_header *mm_next;
  176. X    long mm_nart;
  177. X} memory_marker;
  178. X
  179. X
  180. Xextern article_header *alloc_art();
  181. Xextern char *alloc_str();
  182. X
  183. X/* flags to access_group */
  184. X
  185. X#define    ACC_ALSO_CROSS_POSTINGS    FLAG(1)    /*  */
  186. X#define    ACC_DONT_SORT_ARTICLES    FLAG(2)    /*  */
  187. X#define    ACC_DONT_SPLIT_DIGESTS    FLAG(3)    /* only full digest */
  188. X#define    ACC_ALSO_FULL_DIGEST    FLAG(4)    /* also full digest */
  189. X#define ACC_EXTRA_ARTICLES    FLAG(5)    /* add to current menu */
  190. X#define ACC_ALSO_READ_ARTICLES    FLAG(6)    /*  */
  191. X#define ACC_ONLY_READ_ARTICLES    FLAG(7)    /* unread are already collected */
  192. X#define ACC_MERGED_MENU        FLAG(8)    /* set a_group field */
  193. X#define ACC_ORIG_NEWSRC        FLAG(9)    /* get previously unread articles */
  194. X#define ACC_VALIDATE_ONLY    FLAG(10) /* don't save articles */
  195. X#define ACC_SPEW_MODE        FLAG(11) /*  */
  196. X#define ACC_ON_SENDER        FLAG(12) /* match on sender (only) */
  197. X#define ACC_ON_SUBJECT        FLAG(13) /* match on subject (also) */
  198. X#define ACC_DO_KILL        FLAG(14) /* do auto-kill/select */
  199. END_OF_FILE
  200.   if test 1431 -ne `wc -c <'articles.h'`; then
  201.     echo shar: \"'articles.h'\" unpacked with wrong size!
  202.   fi
  203.   # end of 'articles.h'
  204. fi
  205. if test -f 'conf/m-convex.h' -a "${1}" != "-c" ; then 
  206.   echo shar: Will not clobber existing file \"'conf/m-convex.h'\"
  207. else
  208.   echo shar: Extracting \"'conf/m-convex.h'\" \(1212 characters\)
  209.   sed "s/^X//" >'conf/m-convex.h' <<'END_OF_FILE'
  210. X/************** Machine (and compiler) dependent definitions. **************
  211. X *
  212. X *    Define appropriate types for the following ranges of integer
  213. X *    variables.  These are processor & compiler dependent, but the
  214. X *    distributed definitions will probably work on most systems.
  215. X */
  216. X
  217. X
  218. X
  219. X/*      MACHINE TYPE    DEFINED TYPE        VALUE RANGE    */
  220. X
  221. Xtypedef unsigned char    int8;        /*        0 ..     255 */
  222. Xtypedef short        int16;        /*  -10,000 ..  10,000 */
  223. Xtypedef long        int32;        /* -100,000 .. 100,000 */
  224. Xtypedef unsigned long    uint32;        /*       0 ..  2^31-1 */
  225. X
  226. X
  227. X/*
  228. X *     Define NO_VARARGS if the varargs feature is not available
  229. X *
  230. X *    Also define NO_VARARGS if the vprintf/vsprintf routines are not
  231. X *    available (however, this will only by safe on some machines, like
  232. X *    the VAX).
  233. X *
  234. X */
  235. X
  236. X#define NO_VARARGS
  237. X
  238. X/*
  239. X *    Define STRCSPN if the strcspn() function is not available.
  240. X */
  241. X
  242. X#define STRCSPN     /* */
  243. X
  244. X/*
  245. X *    Define NO_SIGINTERRUPT on BSD based systems which don't have
  246. X *    a siginterrupt() function, but provides an SV_INTERRUPT flag
  247. X *    in <signal.h>.
  248. X */
  249. X
  250. X#define NO_SIGINTERRUPT    /* */
  251. X
  252. X
  253. X/*
  254. X *    Define NETWORK_BYTE_ORDER if the machine's int32's are
  255. X *    already in network byte order, i.e. m68k based.
  256. X */
  257. X
  258. X#define NETWORK_BYTE_ORDER    /* */
  259. END_OF_FILE
  260.   if test 1212 -ne `wc -c <'conf/m-convex.h'`; then
  261.     echo shar: \"'conf/m-convex.h'\" unpacked with wrong size!
  262.   fi
  263.   # end of 'conf/m-convex.h'
  264. fi
  265. if test -f 'conf/m-template.h' -a "${1}" != "-c" ; then 
  266.   echo shar: Will not clobber existing file \"'conf/m-template.h'\"
  267. else
  268.   echo shar: Extracting \"'conf/m-template.h'\" \(2259 characters\)
  269.   sed "s/^X//" >'conf/m-template.h' <<'END_OF_FILE'
  270. X
  271. X/************** Machine (and compiler) dependent definitions. **************
  272. X *
  273. X *    Define appropriate types for the following ranges of integer
  274. X *    variables.  These are processor & compiler dependent, but the
  275. X *    distributed definitions will probably work on most systems.
  276. X */
  277. X
  278. X
  279. X
  280. X/*      MACHINE TYPE    DEFINED TYPE        VALUE RANGE    */
  281. X
  282. Xtypedef unsigned char    int8;        /*        0 ..     255 */
  283. Xtypedef short        int16;        /*  -10,000 ..  10,000 */
  284. Xtypedef long        int32;        /* -100,000 .. 100,000 */
  285. Xtypedef unsigned long    uint32;        /*       0 ..  2^31-1 */
  286. X
  287. X
  288. X/*
  289. X *     Define NO_VARARGS if the varargs feature is not available.
  290. X *
  291. X *    Also define NO_VARARGS if the vprintf/vsprintf routines are not
  292. X *    available (however, this will only by safe on some machines, like
  293. X *    the VAX).
  294. X *
  295. X *    Defining NO_VARARGS in the m- file should only be done for
  296. X *    architectures which does not support it in general, or where
  297. X *    a majority of the systems available on that architecture
  298. X *    doesn't have it.  Otherwise, it should be defined in the
  299. X *    s- file, because this is primarily OS dependent.
  300. X *
  301. X *    NO_VARARGS can be overruled by defining HAVE_VARARGS in the s-
  302. X *    file.
  303. X */
  304. X
  305. X/* #define NO_VARARGS /* unless HAVE_VARARGS */
  306. X
  307. X/*
  308. X *    Define STRCSPN if the strcspn() function is not available.
  309. X */
  310. X
  311. X/* #define STRCSPN     /* */
  312. X
  313. X/*
  314. X *    Define NO_SIGINTERRUPT on BSD based systems which don't have
  315. X *    a siginterrupt() function, but provides an SV_INTERRUPT flag
  316. X *    in <signal.h>.
  317. X */
  318. X
  319. X/* #define NO_SIGINTERRUPT    /* */
  320. X
  321. X
  322. X#ifdef NETWORK_DATABASE
  323. X
  324. X/*
  325. X *    Define NETWORK_BYTE_ORDER if the machine's int32's are
  326. X *    already in network byte order, i.e. m68k based.
  327. X */
  328. X
  329. X#define NETWORK_BYTE_ORDER    /* */
  330. X
  331. X/*
  332. X *    OTHERWISE provide the functions/macros ntohl/htonl to
  333. X *    convert longs from and to network byte order
  334. X */
  335. X
  336. X#ifndef NETWORK_BYTE_ORDER
  337. X
  338. X/*
  339. X * Include appropriate files or define macroes or functions (include them
  340. X * in data.c) to convert longs and shorts to and from network byte order.
  341. X */
  342. X
  343. X/*
  344. X * This will work on most BSD based systems...
  345. X */
  346. X
  347. X#include <netinet/in.h>
  348. X
  349. X/*
  350. X * Otherwise, define something appropriate below
  351. X */
  352. X
  353. X#define htonl(l)    ...    /* host long to network long */
  354. X#define ntohl(l)    ...    /* network long to host long */
  355. X
  356. X#endif    /* not NETWORK BYTE ORDER */
  357. X
  358. X#endif    /* NETWORK DATABASE */
  359. END_OF_FILE
  360.   if test 2259 -ne `wc -c <'conf/m-template.h'`; then
  361.     echo shar: \"'conf/m-template.h'\" unpacked with wrong size!
  362.   fi
  363.   # end of 'conf/m-template.h'
  364. fi
  365. if test -f 'conf/s-hpux6-5.h' -a "${1}" != "-c" ; then 
  366.   echo shar: Will not clobber existing file \"'conf/s-hpux6-5.h'\"
  367. else
  368.   echo shar: Extracting \"'conf/s-hpux6-5.h'\" \(202 characters\)
  369.   sed "s/^X//" >'conf/s-hpux6-5.h' <<'END_OF_FILE'
  370. X/*
  371. X *    This version is for Hewlett-Packard HP-UX 6.5
  372. X *    Do they really have to screw things up in every release?
  373. X */
  374. X
  375. X#include "s-hpux.h"
  376. X
  377. X#define    SIGNAL_HANDLERS_ARE_VOID    /* */
  378. X
  379. X#define EXTRA_LIB    -lBSD
  380. END_OF_FILE
  381.   if test 202 -ne `wc -c <'conf/s-hpux6-5.h'`; then
  382.     echo shar: \"'conf/s-hpux6-5.h'\" unpacked with wrong size!
  383.   fi
  384.   # end of 'conf/s-hpux6-5.h'
  385. fi
  386. if test -f 'conf/s-sgi4D.h' -a "${1}" != "-c" ; then 
  387.   echo shar: Will not clobber existing file \"'conf/s-sgi4D.h'\"
  388. else
  389.   echo shar: Extracting \"'conf/s-sgi4D.h'\" \(1067 characters\)
  390.   sed "s/^X//" >'conf/s-sgi4D.h' <<'END_OF_FILE'
  391. X/*
  392. X *    This file is for a Silicon Graphics 4D series machines
  393. X *    running IRIX 3.1 or 3.2.
  394. X *    HAVE_JOBCONTROL should only be defined if you have 3.2.
  395. X */
  396. X
  397. X#include "s-sys5.h"
  398. X
  399. X/*
  400. X *    Define if your system has BSD like job control (SIGTSTP works)
  401. X */
  402. X
  403. X#define HAVE_JOBCONTROL            /* */
  404. X
  405. X/*
  406. X *    Define if your system has a 4.3BSD like syslog library.
  407. X */
  408. X
  409. X#define HAVE_SYSLOG
  410. X
  411. X/*
  412. X *    Define HAVE_GETHOSTNAME if your system provides a BSD like
  413. X *    gethostname routine.
  414. X */
  415. X
  416. X#undef    HAVE_UNAME
  417. X#define    HAVE_GETHOSTNAME            /* System V */
  418. X
  419. X/*
  420. X *    Specify the default mailer to be invoked by nnmail
  421. X */
  422. X
  423. X#undef    MAILX
  424. X#define    MAILX        "/usr/bsd/Mail"
  425. X
  426. X/*
  427. X *    Define standard compiler flags here:
  428. X */
  429. X
  430. X#define COMPILER_FLAGS -O -I/usr/include/bsd
  431. X
  432. X
  433. X/*
  434. X *    Define the maximum length of any pathname that may occur
  435. X */
  436. X
  437. X#undef    FILENAME
  438. X#define    FILENAME     1024    /* really should be from limits.h */
  439. X
  440. X/*
  441. X *    If your system requires other libraries when linking nn
  442. X *    specify them here:  (use shared C library for reduced
  443. X *    size and portability across releases).
  444. X */
  445. X
  446. X#define EXTRA_LIB -lbsd -lc_s
  447. END_OF_FILE
  448.   if test 1067 -ne `wc -c <'conf/s-sgi4D.h'`; then
  449.     echo shar: \"'conf/s-sgi4D.h'\" unpacked with wrong size!
  450.   fi
  451.   # end of 'conf/s-sgi4D.h'
  452. fi
  453. if test -f 'conf/s-xenix386.h' -a "${1}" != "-c" ; then 
  454.   echo shar: Will not clobber existing file \"'conf/s-xenix386.h'\"
  455. else
  456.   echo shar: Extracting \"'conf/s-xenix386.h'\" \(923 characters\)
  457.   sed "s/^X//" >'conf/s-xenix386.h' <<'END_OF_FILE'
  458. X/*
  459. X *  Thu Jun 29 18:55:47 1989 - Chip Rosenthal <chip@vector.Dallas.TX.US>
  460. X *    Generated SCO XENIX/386 version from "s-template.h".  XENIX has
  461. X *    both "termcap" and "terminfo".  This version reflects the local
  462. X *    preference for "termcap".
  463. X */
  464. X
  465. X#define NO_DIRENT_H
  466. X#include "s-sys5-tcap.h"
  467. X
  468. X#undef SIGNAL_HANDLERS_ARE_VOID
  469. X
  470. X#define    HAVE_DIRECTORY            /* */
  471. X#include <sys/ndir.h>            /* SCO XENIX */
  472. Xtypedef struct direct Direntry;        /* BSD and SCO XENIX */
  473. X
  474. X#undef HAVE_MKDIR
  475. X
  476. X#undef    DETATCH_TERMINAL
  477. X
  478. X/*
  479. X *    Define AVOID_SHELL_EXEC if the system gets confused by
  480. X *        #!/bin/sh
  481. X *    lines in shell scripts, e.g. only reads #! and thinks it
  482. X *    is a csh script.
  483. X */
  484. X
  485. X#define AVOID_SHELL_EXEC        /* */
  486. X
  487. X/*
  488. X *    Specify the default mailer to be invoked by nnmail
  489. X */
  490. X
  491. X#undef    MAILX
  492. X#define    MAILX    "/usr/bin/mail"        /* SCO XENIX */
  493. X
  494. X/*
  495. X *    If your system requires other libraries when linking nn
  496. X *    specify them here:
  497. X */
  498. X
  499. X#define EXTRA_LIB    -lx
  500. END_OF_FILE
  501.   if test 923 -ne `wc -c <'conf/s-xenix386.h'`; then
  502.     echo shar: \"'conf/s-xenix386.h'\" unpacked with wrong size!
  503.   fi
  504.   # end of 'conf/s-xenix386.h'
  505. fi
  506. if test -f 'format.awk' -a "${1}" != "-c" ; then 
  507.   echo shar: Will not clobber existing file \"'format.awk'\"
  508. else
  509.   echo shar: Extracting \"'format.awk'\" \(2063 characters\)
  510.   sed "s/^X//" >'format.awk' <<'END_OF_FILE'
  511. XBEGIN {
  512. X    linebuf = indent = ""
  513. X    curcol = indcol = 0
  514. X    maxcol = 78
  515. X    progname = ""
  516. X    firstsh = 1
  517. X    numcol = 0
  518. X    spacing = 1
  519. X    wordspace = " "
  520. X    tab = sprintf("%c",9)
  521. X}
  522. X
  523. X/^\.SH / {
  524. X    if (firstsh == 0) printf("%s\n\n", linebuf)
  525. X    firstsh = 0
  526. X
  527. X    printf("From: %s\nSubject:", progname);
  528. X    for (i = 2; i <= NF; i++) printf(" %s", $i);
  529. X    printf("\n\n")
  530. X
  531. X    linebuf = indent = ""
  532. X    curcol = indcol = 0
  533. X    next
  534. X}
  535. X
  536. X/^\.TH / {
  537. X    progname = $2
  538. X    next
  539. X}
  540. X
  541. X/^\.UC / {
  542. X    next
  543. X}
  544. X
  545. X/^\.br/ || /^\.sp/ {
  546. X    if (linebuf != indent) {
  547. X        printf("%s\n", linebuf)
  548. X    }
  549. X    linebuf = indent
  550. X    curcol = indcol
  551. X    next
  552. X}
  553. X
  554. X/^\.PP/ {
  555. X    if (linebuf != indent) printf("%s\n", linebuf)
  556. X
  557. X    printf("\n")
  558. X
  559. X    linebuf = "   " ; curcol = 3
  560. X    indent = "" ; indcol = 0
  561. X    next
  562. X}
  563. X
  564. X/^\.LP/ {
  565. X    if (linebuf != indent) printf("%s\n", linebuf)
  566. X
  567. X    printf("\n")
  568. X
  569. X    linebuf = indent = ""
  570. X    curcol = indcol = 0
  571. X    next
  572. X}
  573. X
  574. X/^\.TP/ {
  575. X    if (linebuf != indent) printf("%s\n", linebuf)
  576. X
  577. X    printf("\n")
  578. X
  579. X    getline; linebuf = $0
  580. X    indent = "     "
  581. X    curcol = indcol = 5
  582. X    if (length(linebuf) >= 5) {
  583. X        printf("%s\n", linebuf)
  584. X        linebuf = indent
  585. X    } else {
  586. X        while (length(linebuf) < 4) linebuf = linebuf " "
  587. X    }
  588. X    next
  589. X}
  590. X
  591. X/^\.\\"ta/ {
  592. X    for (numcol = 2; numcol <= NF; numcol++) tabcol[numcol-1] = $numcol
  593. X    numcol = NF
  594. X    next
  595. X}
  596. X
  597. X/^\.DT/ {
  598. X    numcol = 0
  599. X    next
  600. X}
  601. X
  602. Xnumcol != 0 {
  603. X    j = length($0)
  604. X    k = 0
  605. X    g = 1
  606. X    for (i = 1; i<=j; i++) {
  607. X        while (k < tabcol[g]) {
  608. X            printf(" ")
  609. X            k++
  610. X        }
  611. X        c = substr($0,i,1)
  612. X        if (c == tab) {
  613. X            g++
  614. X        } else {
  615. X            printf("%s", c)
  616. X            k++
  617. X        }
  618. X    }
  619. X    printf("\n")
  620. X    next
  621. X}
  622. X
  623. X/^[     ]/ {
  624. X    if (linebuf != indent) printf("%s\n",linebuf)
  625. X    linebuf = indent "     "
  626. X    curcol = indcol+5
  627. X}
  628. X
  629. X{
  630. X    word = 1
  631. X    wordspace = " "
  632. X    spacing = 1
  633. X}
  634. X
  635. X/^\.[IB] / {
  636. X    word = 2
  637. X}
  638. X
  639. X/^\.[IB]R / {
  640. X    wordspace = ""
  641. X    word = 2
  642. X    spacing = 0
  643. X}
  644. X
  645. X{
  646. X     sep = " "
  647. X    if (linebuf == indent) sep = ""
  648. X
  649. X    while (word <= NF) {
  650. X        k = length($word)
  651. X        if ((curcol + k) > maxcol) {
  652. X            printf("%s\n", linebuf)
  653. X            linebuf = indent
  654. X            curcol = indcol
  655. X            sep = ""
  656. X        }
  657. X        linebuf = linebuf sep $word
  658. X        sep = wordspace
  659. X        curcol += spacing + k
  660. X        word++
  661. X    }
  662. X}
  663. X
  664. XEND {
  665. X    if (linebuf != indent) printf("%s\n\n", linebuf)
  666. X}
  667. END_OF_FILE
  668.   if test 2063 -ne `wc -c <'format.awk'`; then
  669.     echo shar: \"'format.awk'\" unpacked with wrong size!
  670.   fi
  671.   # end of 'format.awk'
  672. fi
  673. if test -f 'help/help.extended' -a "${1}" != "-c" ; then 
  674.   echo shar: Will not clobber existing file \"'help/help.extended'\"
  675. else
  676.   echo shar: Extracting \"'help/help.extended'\" \(1353 characters\)
  677.   sed "s/^X//" >'help/help.extended' <<'END_OF_FILE'
  678. X;:AEXTENDED COMMANDS;:A
  679. X
  680. X:help COMMAND        give help on specific command
  681. X
  682. X:q!            quit nn without updating .newsrc
  683. X:x            quit nn, mark current group as read
  684. X
  685. X:! SHELL-COMMAND    execute SHELL-COMMAND w/o screen redraw.
  686. X
  687. X:admin            enter administration mode
  688. X:bug            send a bug report
  689. X:cd [DIR]        change working directory to DIR
  690. X:compile        compile & reload kill file
  691. X:coredump        abort with a core dump
  692. X:cost            show current accounting figures
  693. X:decode            decode uuencoded article(s)
  694. X:define N ... end    define macro N
  695. X:local VARIABLE [VALUE]    make VARIABLE local to current group [and set to VALUE]
  696. X:man            read online manual
  697. X:map MODE KEY COMMAND    remap key or command (use ':help map' for more info)
  698. X:mkdir [DIR]        create directory DIR (will prompt for DIR if omitted)
  699. X:print            print article
  700. X:pwd            print current directory
  701. X:rmail            read incoming mail (no update)
  702. X:set VARIABLE [VALUE]    set or unset variable (use ':help set' for more info)
  703. X:show groups HOW    show group subscriptions etc.
  704. X:show kill        show kill file entries for current group
  705. X:show map [MAP]        show key mappings (MAP = #, key, menu, show)
  706. X:show rc [GROUP]    show (current) GROUPS .newsrc entry
  707. X:sort [MODE]        sort menu according to subject, age, or arrival
  708. X:toggle VARIABLE    toggle boolean variable
  709. X:unread (N)        mark current group as unread (last N articles)
  710. X:unset VARIABLE        clear variable
  711. X:unshar            unshar article(s)
  712. END_OF_FILE
  713.   if test 1353 -ne `wc -c <'help/help.extended'`; then
  714.     echo shar: \"'help/help.extended'\" unpacked with wrong size!
  715.   fi
  716.   # end of 'help/help.extended'
  717. fi
  718. if test -f 'help/help.map' -a "${1}" != "-c" ; then 
  719.   echo shar: Will not clobber existing file \"'help/help.map'\"
  720. else
  721.   echo shar: Extracting \"'help/help.map'\" \(781 characters\)
  722.   sed "s/^X//" >'help/help.map' <<'END_OF_FILE'
  723. X;:AMAP COMMAND;:A
  724. X
  725. Xmap TABLE        show contents of mapping table
  726. X
  727. Xmap menu KEY COMMAND    map KEY into COMMAND in menu mode
  728. Xmap show KEY COMMAND    map KEY into COMMAND in article presentation mode
  729. Xmap both KEY COMMAND    map KEY into COMMAND in both modes
  730. Xmap key  KEY1 KEY2    map KEY1 into KEY2 (unconditionally)
  731. Xmap #N   CH1 CH2 ...    define the input sequence CH1 CH2 ... as special key N
  732. X
  733. X;:ASPECIAL FORMS;:A  (TABLE = menu, show, both)
  734. X
  735. Xmap TABLE KEY1 as KEY2    map KEY1 into the command bound to KEY2
  736. Xmap TABLE KEY macro N    map KEY to invoke macro number N
  737. Xmap menu KEY article N    map KEY to select item number N (base 0) on the menu
  738. X
  739. X;:AKEYS;:A
  740. X
  741. X0xNN    the ascii character NN
  742. XC    the character C
  743. X^C    control-C
  744. X^?    DEL
  745. X#N    special key number N
  746. X
  747. Xup, down, left, rigth:  the arrow keys
  748. X
  749. X;:Chelp.commands
  750. END_OF_FILE
  751.   if test 781 -ne `wc -c <'help/help.map'`; then
  752.     echo shar: \"'help/help.map'\" unpacked with wrong size!
  753.   fi
  754.   # end of 'help/help.map'
  755. fi
  756. if test -f 'help/help.menu' -a "${1}" != "-c" ; then 
  757.   echo shar: Will not clobber existing file \"'help/help.menu'\"
  758. else
  759.   echo shar: Extracting \"'help/help.menu'\" \(1003 characters\)
  760.   sed "s/^X//" >'help/help.menu' <<'END_OF_FILE'
  761. X;:ASELECT (toggle);:A                ;:AMOVE;:A
  762. Xa-z0-9    Specified article        ,    Next menu line
  763. Xx-y    Range x to y            /    Previous menu line
  764. Xx*    Same subject as x        SPACE    Next menu page (if any)
  765. X.    Current article            < >    Prev/Next menu page
  766. X@ ~    Reverse/Undo all selections    ^ $    First/Last menu page
  767. X=regexp    Matching subjects (=. selects all)
  768. XL/JJJJ    Leave/Change attributes
  769. X;:ASHOW SELECTED ARTICLES;:A
  770. XSPACE    Show (only when on last menu page)
  771. XZ     Show NOW, and return to this group afterwards
  772. XX    Show NOW, and continue with next group
  773. X;:AGOTO OTHER GROUPS;:A
  774. XX    Update current group, skip to next.    Y    Group overview
  775. XN P     Goto next/previous group.        ~/.nn/init:
  776. XG    Goto named group or open a folder.        Defines group
  777. XB A    Go back/forward in groups already read.        presentation sequence.
  778. X;:AMISCELLANEOUS;:A
  779. XU C    (Un)subscribe / Cancel            :man    Online manual
  780. XF R M    Follow-up/Reply/Mail            :help    More online help
  781. XS O W    Save articles                !    Shell escape
  782. X:post    Post new article            "    Change menu layout
  783. X:unshar :decode :patch    Unpack articles        Q    Quit nn
  784. END_OF_FILE
  785.   if test 1003 -ne `wc -c <'help/help.menu'`; then
  786.     echo shar: \"'help/help.menu'\" unpacked with wrong size!
  787.   fi
  788.   # end of 'help/help.menu'
  789. fi
  790. if test -f 'help/help.more' -a "${1}" != "-c" ; then 
  791.   echo shar: Will not clobber existing file \"'help/help.more'\"
  792. else
  793.   echo shar: Extracting \"'help/help.more'\" \(1248 characters\)
  794.   sed "s/^X//" >'help/help.more' <<'END_OF_FILE'
  795. X;:ASCROLLING;:A          ;:AABSOLUTE LINE;:A        ;:ASEARCHING;:A
  796. XSP      1 page forw      ^    top        /RE    find regular expr.
  797. Xd    1/2 page forw      gNUM    line NUM    . //    repeat last search
  798. XCR      1 line forw      $    last line
  799. XDEL       1 page back      h    header        ;:ATEXT CONVERSIONS;:A
  800. Xu       1/2 page back      H    full digest    D       decrypt article (rot13)
  801. XTAB    skip section                c       compress spaces
  802. X;:AGOTO ANOTHER ARTICLE;:A
  803. XSP      next (at end of current article)    ;:ACANCEL, SUBSCRIBE, KILL;:A
  804. Xn, p    next/previous article               C       cancel article
  805. Xl       mark article for later action       U       (un)subscribe to group
  806. Xk       kill subject (not permanently)      K       kill/select handling
  807. X*       select subject
  808. X                                                ;:AQUIT / ESCAPE;:A
  809. X;:ASAVE;:A                                   =       back to menu
  810. Xs, o, w   save with full/short/no header         N       goto next group
  811. X:unshar :decode :patch      unpack article    X       as N, mark as read
  812. X                             !, ^Z   Shell escape, suspend
  813. X;:AREPLY, POST;:A                    Q       quit nn
  814. Xr       mail reply to author of article
  815. Xm       mail (or forward article)           ;:AREDRAW;:A
  816. Xf       post follow-up to article           ^P      Repeat last message
  817. X:post   post new article                    ^L, ^R  Redraw screen
  818. END_OF_FILE
  819.   if test 1248 -ne `wc -c <'help/help.more'`; then
  820.     echo shar: \"'help/help.more'\" unpacked with wrong size!
  821.   fi
  822.   # end of 'help/help.more'
  823. fi
  824. if test -f 'help/help.sort' -a "${1}" != "-c" ; then 
  825.   echo shar: Will not clobber existing file \"'help/help.sort'\"
  826. else
  827.   echo shar: Extracting \"'help/help.sort'\" \(880 characters\)
  828.   sed "s/^X//" >'help/help.sort' <<'END_OF_FILE'
  829. X;:AMENU SORTING MODES AND COMMANDS;:A
  830. X
  831. XVariable:    sort-mode
  832. X
  833. X    Determines the default menu sorting method.  It is a numeric
  834. X    value corresponding to the modes described below:
  835. X
  836. X:sort
  837. X    Sort articles on menu according to current sort-mode.
  838. X
  839. X:sort arrival        (sort-mode 0)
  840. X    Sort articles in arrival, i.e. article number order.
  841. X
  842. X:sort subject        (sort-mode 1)
  843. X    Articles are grouped according to subject, each article within
  844. X    a group is sorted according to posting date and time, and
  845. X    the groups are sorted according to the age of the first article
  846. X    in each group.
  847. X
  848. X:sort lexical        (sort-mode 2)
  849. X    Articles are sorted in lexicographical order on subject.
  850. X    Articles with identical subjects are sorted after age.
  851. X
  852. X:sort age        (sort-mode 3)
  853. X    Articles ordered after posting date only.
  854. X
  855. X:sort sender        (sort-mode 4)
  856. X    Articles ordered after sender's name.
  857. X    Articles from same sender are sorted on age.
  858. END_OF_FILE
  859.   if test 880 -ne `wc -c <'help/help.sort'`; then
  860.     echo shar: \"'help/help.sort'\" unpacked with wrong size!
  861.   fi
  862.   # end of 'help/help.sort'
  863. fi
  864. if test -f 'inews/README' -a "${1}" != "-c" ; then 
  865.   echo shar: Will not clobber existing file \"'inews/README'\"
  866. else
  867.   echo shar: Extracting \"'inews/README'\" \(2391 characters\)
  868.   sed "s/^X//" >'inews/README' <<'END_OF_FILE'
  869. X
  870. X     This is a "pseudo" inews which allows remote posting using
  871. Xthe NNTP server.  Essentially it takes a bunch of arguments and ignores
  872. Xones starting with "-", expecting to find at least one which is
  873. Xa file name.  If no files are specified, it uses standard input
  874. Xas the input file.
  875. X
  876. X     It then opens a connection to the NNTP server on the remote
  877. Xmachine and blasts the article across.  It then closes the connection.
  878. XIf it doesn't find a From: or Path: line, it inserts them, in the
  879. Xdefault format
  880. X
  881. X    From: login@hostname.DOMAIN (Full_name)
  882. X    Path: hostname!login
  883. X
  884. Xwhere DOMAIN is a #define in ./conf.h, and should be changed to reflect
  885. Xyour system.  A good choice is "UUCP" if you are not a member of the
  886. XInternet.  "Full_name" understands the & hack in password files. If
  887. X"HIDDENNET" is defined in ./conf.h, DOMAIN is used as the complete host
  888. Xname, and the format used is
  889. X
  890. X    From: login@DOMAIN (Full_name)
  891. X    Path: login
  892. X
  893. X     "hostname" is figured out by what you've #defined in ../config.h.
  894. XIf you have defined GHNAME, it uses the gethostname() call.
  895. XIf you've defined UUNAME, it figured it out from the file
  896. X/etc/uucpname.  Finally, if neither is defined it gets it from
  897. X/usr/include/whoami.h.  If you have GHNAME defined and your
  898. Xgethostname() returns your fully-qualified Internet name,
  899. Xundefine DOMAIN.
  900. X
  901. X     The point here is that the thing looks like inews to any program
  902. Xwhich would care to post something (e.g., Pnews, postnews, what have
  903. Xyou).  The difference is that the article will look like it was posted
  904. Xon the remote end, not on the local end.  Please note that "postnews"
  905. X(nor any of the other standard news programs) is not required for
  906. Xrrn/nntp on client machines.
  907. X
  908. X     The "test*" files in this directory provide some good test
  909. Xmaterial for inews; you can just redirect inews to take input from
  910. Xthem or whatever.
  911. X
  912. X     Thanks to Steven Grady <grady@postgres.berkeley.edu> for
  913. Xwriting this, and for wasting a lot of his valuable time dealing
  914. Xwith the can-o'-worms that is the real inews.
  915. X
  916. XBUGS:
  917. X
  918. X     This version of inews doesn't handle real inews options.  As
  919. Xa result, some posting programs (notably the Gnumacs front end) will
  920. Xfail if they use this program.  In the interests of simplicity, I
  921. Xhave no plans for modifying mini-inews to handle real-inews options.
  922. XHowever, if you'd like to send me diffs I'll be more than happy to
  923. Xinstall them for the next release.
  924. END_OF_FILE
  925.   if test 2391 -ne `wc -c <'inews/README'`; then
  926.     echo shar: \"'inews/README'\" unpacked with wrong size!
  927.   fi
  928.   # end of 'inews/README'
  929. fi
  930. if test -f 'man/nnpost.1' -a "${1}" != "-c" ; then 
  931.   echo shar: Will not clobber existing file \"'man/nnpost.1'\"
  932. else
  933.   echo shar: Extracting \"'man/nnpost.1'\" \(1598 characters\)
  934.   sed "s/^X//" >'man/nnpost.1' <<'END_OF_FILE'
  935. X.TH NNPOST 1 "Release 6.4"
  936. X.UC 4
  937. X.SH NAME
  938. Xnnpost \- post news articles (\fInn\fP)
  939. X.SH SYNOPSIS
  940. X.B nnpost
  941. X[ \-\fBdksy\fP \fIstring\fP ]
  942. X[ \-\fBf\fP \fIfile\fP ]
  943. X[ \-\fBp\fP ]
  944. X[ \fIgroup\fP... ]
  945. X.SH DESCRIPTION
  946. X.B nnpost
  947. Xis used to post new articles using \fInn\fP's normal interface, but
  948. Xwithout entering \fInn\fP in reading mode.
  949. X.LP
  950. XWhen started, it reads the \fIinit\fP file and then directly executes
  951. X\fInn\fP's \fB:post\fP command.
  952. X.LP
  953. XIt will prompt for a (comma-separated) list of news groups, the
  954. Xarticle subject, a list of keywords, a summary, and the distribution
  955. Xof the article.  Each of these prompts can also be supplied via
  956. Xcommand line options or arguments as described below.
  957. X.LP
  958. XIf a source file is specified with \fB\-f\fP it will be used as the
  959. Xinitial article body.  If the \fB\-p\fP option is also specified, the
  960. Xarticle is posted directly without editing.
  961. X.SH OPTIONS
  962. X.TP
  963. X\fB\-d\fP \fIdistribution\fP
  964. XUse the specified \fIdistribution\fP for the article.
  965. X.TP
  966. X\fB\-k\fP "\fIkeywords\fP"
  967. XAssociate the specified \fIkeywords\fP with the article.
  968. X.sp 0.5v
  969. X.TP
  970. X\fB\-s\fP "\fIsubject\fP"
  971. XUse the specified \fIsubject\fP for the new article.
  972. X.TP
  973. X\fB\-y\fP "\fIsummary\fP"
  974. XInclude the given \fIsummary\fP in the article header.
  975. X.TP
  976. X\fB\-f\fP \fIfile\fP
  977. XRead the article \fIbody\fP from the specified file.
  978. X.TP
  979. X\fB\-p\fP
  980. XPost the article specified with \fB\-f\fP without editing.
  981. X.SH FILES
  982. X.DT
  983. X.ta \w'~/.nn/init'u+3m
  984. X.\"ta 0 12
  985. X~/.nn/init    The control variables for \fInnpost\fP.
  986. X.DT
  987. X.SH SEE ALSO
  988. Xnn(1)
  989. X.SH AUTHOR
  990. XKim F. Storm, Texas Instruments A/S, Denmark
  991. X.br
  992. XE-mail: storm@texas.dk
  993. X
  994. END_OF_FILE
  995.   if test 1598 -ne `wc -c <'man/nnpost.1'`; then
  996.     echo shar: \"'man/nnpost.1'\" unpacked with wrong size!
  997.   fi
  998.   # end of 'man/nnpost.1'
  999. fi
  1000. if test -f 'man/nnspew.8' -a "${1}" != "-c" ; then 
  1001.   echo shar: Will not clobber existing file \"'man/nnspew.8'\"
  1002. else
  1003.   echo shar: Extracting \"'man/nnspew.8'\" \(1242 characters\)
  1004.   sed "s/^X//" >'man/nnspew.8' <<'END_OF_FILE'
  1005. X.TH NNSPEW 8 "Release 6.4"
  1006. X.UC 4
  1007. X.SH NAME
  1008. Xnnspew \- subject database manager (nn)
  1009. X.SH SYNOPSIS
  1010. X.B nnspew
  1011. X.SH DESCRIPTION
  1012. X\fInnspew\fP builds a sorted database of all available subjects in the
  1013. X\fInn\fP article database for fast access via the \fInngrab\fP utility.
  1014. X.LP
  1015. X\fInnspew\fP should be activated regularly to rebuild the subject
  1016. Xdatabase, e.g. by \fIcron\fP.  For example:
  1017. X.sp 0.5v
  1018. X   2 6,9,12,15,18,21 * * *  root /bin/nice /usr/lib/nn/nnspew
  1019. X.LP
  1020. XCross posted articles are only represented in the database once, and
  1021. Xidentical subjects in each group are merged into one to use a minimum
  1022. Xof disk space.  This saves about 50% of the disk space otherwise
  1023. Xrequired.
  1024. X.SH FILES
  1025. X.DT
  1026. X.ta \w'$db/subjects'u+3m
  1027. X.\"ta 0 16
  1028. X$db/subjects    subject database
  1029. X.DT
  1030. X.SH SEE ALSO
  1031. Xnn(1), nnspew(8), egrep(1)
  1032. X.SH NOTES
  1033. X\fInngrap\fP will use the subject database generated by \fInnspew\fP
  1034. Xindependent of its age.  Thus, if you stop running \fInnspew\fP,
  1035. Xremember to remove the subjects file as well.
  1036. X.SH BUGS
  1037. X\fInnmaster\fP should automatically append new articles to the subject
  1038. Xdatabase to keep it up-to-date, and thus require less frequent
  1039. Xrebuilding using \fInnspew\fP.
  1040. X.SH AUTHOR
  1041. XJames A. Woods, NASA Ames Research Center
  1042. X.br
  1043. XE-mail: jaw@ames.arc.nasa.gov
  1044. END_OF_FILE
  1045.   if test 1242 -ne `wc -c <'man/nnspew.8'`; then
  1046.     echo shar: \"'man/nnspew.8'\" unpacked with wrong size!
  1047.   fi
  1048.   # end of 'man/nnspew.8'
  1049. fi
  1050. if test -f 'man/nnstats.1m' -a "${1}" != "-c" ; then 
  1051.   echo shar: Will not clobber existing file \"'man/nnstats.1m'\"
  1052. else
  1053.   echo shar: Extracting \"'man/nnstats.1m'\" \(1572 characters\)
  1054.   sed "s/^X//" >'man/nnstats.1m' <<'END_OF_FILE'
  1055. X.TH NNSTATS 1M "Release 6.4"
  1056. X.\" (c) Copyright 1988, 1990, Kim F. Storm.  All rights reserved.
  1057. X.UC 4
  1058. X.SH NAME
  1059. Xnnstats \- display \fInnmaster\fP collection and expire statistics
  1060. X.SH SYNOPSIS
  1061. X.B nnstats
  1062. X[ \-\fBlt\fP ]
  1063. X[ \-\fBd\fP \fImonth\fP \fIday\fP ]
  1064. X[ \-\fBm\fP \fImonth\fP ]
  1065. X[ \fIlogfile\fP ]...
  1066. X.SH DESCRIPTION
  1067. X.I nnstats
  1068. Xwill extract the collection (C) and expiration (X) entries from the
  1069. Xlog file and calculate total and average number of articles, groups
  1070. Xand elapsed time per day, per month, or for the duration of the whole
  1071. Xlog file.
  1072. X.LP
  1073. XNormally only a summary for the specified period is printed.  If
  1074. X\-\fBl\fP is specified, the statistics for each day in the period is
  1075. Xalso printed, and if \-\fBt\fP is specified the summary is not
  1076. Xprinted.
  1077. X.LP
  1078. XNormally the statistics is collected for all days in the log files (or
  1079. Xthe current log file if one is not specified).
  1080. X.LP
  1081. XIf "\-\fBm\fP \fImonth\fP" is specified, the statistics for that month
  1082. Xis calculated.  The \fImonth\fP is specified in normal \fIdate\fP
  1083. Xnotation, i.e. a capitalized three letter abbreviation like Jan, Feb, ...
  1084. X.LP
  1085. XIf "\-\fBd\fP \fImonth\fP \fIday\fP" is specified, the statistics for
  1086. Xthat date only is calculated and printed.
  1087. X.SH FILES
  1088. X.DT
  1089. X.ta \w'.../Log'u+3m
  1090. X.\"ta 0 20
  1091. X.../Log    The log file
  1092. X.DT
  1093. X.SH SEE ALSO
  1094. Xnn(1), nnusage(1M), nnadmin(1M), nnmaster(8)
  1095. X.SH NOTES
  1096. XIf \fInnmaster\fP is run with options \-\fBL\fPCX, \fInnstats\fP will
  1097. Xnot work, because the necessary entries are not written to the log file.
  1098. X.SH AUTHORS
  1099. XMark Moraes <moraes@csri.toronto.edu>
  1100. X.br
  1101. XKim F. Storm <storm@texas.dk>
  1102. X
  1103. X
  1104. END_OF_FILE
  1105.   if test 1572 -ne `wc -c <'man/nnstats.1m'`; then
  1106.     echo shar: \"'man/nnstats.1m'\" unpacked with wrong size!
  1107.   fi
  1108.   # end of 'man/nnstats.1m'
  1109. fi
  1110. if test -f 'man/nntidy.1' -a "${1}" != "-c" ; then 
  1111.   echo shar: Will not clobber existing file \"'man/nntidy.1'\"
  1112. else
  1113.   echo shar: Extracting \"'man/nntidy.1'\" \(2215 characters\)
  1114.   sed "s/^X//" >'man/nntidy.1' <<'END_OF_FILE'
  1115. X.TH NNTIDY 1 "Release 6.4"
  1116. X.\" (c) Copyright 1988, 1990, Kim F. Storm.  All rights reserved.
  1117. X.UC 4
  1118. X.SH NAME
  1119. Xnntidy \- tidy your personal .newsrc file
  1120. X.SH SYNOPSIS
  1121. X.B nntidy
  1122. X[ \-\fBaciNQrsuv\fP ]  [ group ]...
  1123. X.SH DESCRIPTION
  1124. X.B nntidy
  1125. Xwill clean out non-existing groups, adjust obviously wrong article
  1126. Xnumbers, and remove badly formed lines from your .newsrc file.
  1127. X.LP
  1128. XIt may optionally remove ignored groups, unsubscribed groups, and
  1129. Xgroups which are not part of your presentation sequence or the groups
  1130. Xspecified on the command line.
  1131. X.LP
  1132. XYou should run
  1133. X.B nntidy
  1134. Xif your rc file has been corrupted for some reason.
  1135. X.SH OPTIONS
  1136. X.TP
  1137. X.B \-a
  1138. XEquivalent to
  1139. X.B \-cisu.
  1140. X.TP
  1141. X.B \-c
  1142. XRemove unrecognized lines.  This will also remove the `options' line
  1143. Xused by some older news readers, such as
  1144. X.BR readnews (1)
  1145. X.TP
  1146. X.B \-i
  1147. XRemove entries for groups which are ignored in the database, e.g.
  1148. Xentries marked with `X' in the GROUPS file.
  1149. X.TP
  1150. X.B \-r
  1151. XRemove entries for unsubscribed groups.
  1152. X.TP
  1153. X.B \-s
  1154. XRemove entries which are not included in the group presentation
  1155. Xsequence defined in the init file.  If one or more groups are
  1156. Xspecified on the command line, entries not matched by these groups
  1157. X(and their subgroups etc) will be removed.
  1158. X.sp 0.5v
  1159. XNotice that depending on how you construct the presentation sequence,
  1160. Xthis may cause unsubscribed groups to be removed from .newsrc, but
  1161. Xthis will not normally happen.
  1162. X.TP
  1163. X.B \-u
  1164. XTruncate entries for unsubscribed groups, by removing the article
  1165. Xnumbers and leaving only the news group name and the `!' mark.
  1166. X.TP
  1167. X.B \-v
  1168. XVerbose operation.  Reports each change made to the .newsrc file.
  1169. X.TP
  1170. X.B \-N
  1171. XNo update mode.  The requested operations are performed, but the
  1172. Xresult is not written back to disk.  This can be used with the
  1173. X.B \-v
  1174. Xoption to see whether tidying is required.
  1175. X.TP
  1176. X.B \-Q
  1177. XQuiet operation.  The version information is not printed.
  1178. X.SH FILES
  1179. X.DT
  1180. X.ta \w'~/.newsrc.tidy'u+3m
  1181. X.\"ta 0 20
  1182. X~/.newsrc    The record of read articles
  1183. X.br
  1184. X~/.newsrc.tidy    The original rc file before tidy
  1185. X.DT
  1186. X.SH SEE ALSO
  1187. Xnn(1), nncheck(1), nngoback(1), nngrep(1)
  1188. X.br
  1189. Xnnadmin(1M), nnquery(1M), nnusage(1M), nnmaster(8)
  1190. X.SH AUTHOR
  1191. XKim F. Storm, Texas Instruments A/S, Denmark
  1192. X.br
  1193. XE-mail: storm@texas.dk
  1194. X
  1195. X
  1196. END_OF_FILE
  1197.   if test 2215 -ne `wc -c <'man/nntidy.1'`; then
  1198.     echo shar: \"'man/nntidy.1'\" unpacked with wrong size!
  1199.   fi
  1200.   # end of 'man/nntidy.1'
  1201. fi
  1202. if test -f 'man/nnusage.1m' -a "${1}" != "-c" ; then 
  1203.   echo shar: Will not clobber existing file \"'man/nnusage.1m'\"
  1204. else
  1205.   echo shar: Extracting \"'man/nnusage.1m'\" \(1194 characters\)
  1206.   sed "s/^X//" >'man/nnusage.1m' <<'END_OF_FILE'
  1207. X.TH NNUSAGE 1M "Release 6.4"
  1208. X.\" (c) Copyright 1988, 1990, Kim F. Storm.  All rights reserved.
  1209. X.UC 4
  1210. X.SH NAME
  1211. Xnnusage \- display \fInn\fP usage statistics
  1212. X.SH SYNOPSIS
  1213. X.B nnusage
  1214. X[ -t ]
  1215. X.SH DESCRIPTION
  1216. X.B nnusage
  1217. Xwill extract the usage entries from the log file and calculate the
  1218. Xtotal usage time for each \fInn\fP user.
  1219. X.LP
  1220. XWithout options, the output will be sorted according to user names.
  1221. X.LP
  1222. XWith the \-t option, \fInnusage\fP will list the users ordered after
  1223. Xthe total usage time.
  1224. X.LP
  1225. XSince it is possible to
  1226. Xsuspend
  1227. X\fInn\fP, or leave the terminal while \fInn\fP is active, \fInn\fP
  1228. Xtries to be intelligent when it calculates the usage time so it will
  1229. Xtruly report the actual time spent on news reading.
  1230. X.SH FILES
  1231. X.DT
  1232. X.ta \w'.../Log'u+3m
  1233. X.\"ta 0 20
  1234. X.../Log    The log file
  1235. X.DT
  1236. X.SH SEE ALSO
  1237. Xnn(1), nncheck(1), nngoback(1), nngrep(1), nntidy(1)
  1238. X.br
  1239. Xnnadmin(1M), nnquery(1M), nnmaster(8)
  1240. X.SH NOTES
  1241. XThe \fInn\fP package must have been compiled with the STATISTICS
  1242. Xoption turned on to produce the usage entries in the log file.
  1243. X.LP
  1244. XOnly \fInn\fP sessions longer than 5 minutes are registered in the log file.
  1245. X.SH AUTHOR
  1246. XKim F. Storm, Texas Instruments A/S, Denmark
  1247. X.br
  1248. XE-mail: storm@texas.dk
  1249. X
  1250. X
  1251. END_OF_FILE
  1252.   if test 1194 -ne `wc -c <'man/nnusage.1m'`; then
  1253.     echo shar: \"'man/nnusage.1m'\" unpacked with wrong size!
  1254.   fi
  1255.   # end of 'man/nnusage.1m'
  1256. fi
  1257. if test -f 'menu.h' -a "${1}" != "-c" ; then 
  1258.   echo shar: Will not clobber existing file \"'menu.h'\"
  1259. else
  1260.   echo shar: Extracting \"'menu.h'\" \(2211 characters\)
  1261.   sed "s/^X//" >'menu.h' <<'END_OF_FILE'
  1262. X/*
  1263. X *    (c) Copyright 1990, Kim Fabricius Storm.  All rights reserved.
  1264. X *
  1265. X *    Various module return codes.
  1266. X */
  1267. X
  1268. X/* menu commands */
  1269. X
  1270. X#define ME_QUIT        0    /* quit nn */
  1271. X#define ME_NEXT        1    /* continue to next group */
  1272. X#define ME_PREV        3    /* previous group */
  1273. X#define ME_NO_ARTICLES    4    /* no articles in group */
  1274. X#define ME_REDRAW    5    /* redraw screen after return */
  1275. X#define ME_NO_REDRAW    6    /* screen is not corrupted */
  1276. X#define ME_REENTER_GROUP 7    /* reenter after .newsrc update */
  1277. X
  1278. X
  1279. X/* more commands */
  1280. X
  1281. X#define MC_QUIT        0    /* quit nn */
  1282. X#define    MC_NEXT        1    /* next article */
  1283. X#define MC_MENU        2    /* return to menu */
  1284. X#define MC_PREV        3    /* previous article */
  1285. X#define MC_NEXTSUBJ    4    /* show next subject */
  1286. X#define MC_ALLSUBJ    5    /* show all with same subject */
  1287. X#define MC_NEXTGROUP    6    /* next group, no read */
  1288. X#define    MC_READGROUP    7    /* next group, mark as read */
  1289. X#define MC_PREVIEW_NEXT    8    /* preview next article */
  1290. X#define MC_PREVIEW_OTHER 9    /* preview another article */
  1291. X#define MC_REDRAW    10    /* redraw screen after return */
  1292. X#define MC_NO_REDRAW    11    /* screen is not corrupted */
  1293. X#define    MC_BACK_ART    12    /* back one article (don't deselect cur) */
  1294. X#define MC_FORW_ART    13    /* forward one article (deselect cur) */
  1295. X#define MC_DO_KILL    14    /* did kill-select kill */
  1296. X#define MC_DO_SELECT    15    /* did kill-select selection */
  1297. X#define MC_REENTER_GROUP 16    /* reenter after .newsrc update */
  1298. X
  1299. X/* more modes */
  1300. X
  1301. X#define    MM_NORMAL        0x0000    /* show article */
  1302. X#define MM_DIGEST        0x0001    /* show full digest */
  1303. X#define MM_PREVIOUS        0x0010    /* previous article exists */
  1304. X#define MM_LAST_SELECTED    0x0020    /* last selected article in group */
  1305. X#define MM_LAST_GROUP        0x0040    /* last group */
  1306. X#define MM_PREVIEW        0x0080    /* preview mode flag */
  1307. X#define MM_FIRST_ARTICLE     0x0100    /* first article in group */
  1308. X#define MM_LAST_ARTICLE        0x0200    /* last article in group */
  1309. X
  1310. X/* alt_command return values */
  1311. X
  1312. X#define    AC_QUIT        0    /* quit nn */
  1313. X#define    AC_PROMPT    1    /* just redraw prompt line */
  1314. X#define    AC_REDRAW    2    /* redraw screen */
  1315. X#define AC_REORDER    3    /* articles have been reordered */
  1316. X#define    AC_REENTER_GROUP 4    /* reenter group after .newsrc update */
  1317. X#define AC_KEYCMD    5    /* alt_cmd_key contains command */
  1318. X#define AC_UNCHANGED    6    /* no display changes */
  1319. END_OF_FILE
  1320.   if test 2211 -ne `wc -c <'menu.h'`; then
  1321.     echo shar: \"'menu.h'\" unpacked with wrong size!
  1322.   fi
  1323.   # end of 'menu.h'
  1324. fi
  1325. if test -f 'news.h' -a "${1}" != "-c" ; then 
  1326.   echo shar: Will not clobber existing file \"'news.h'\"
  1327. else
  1328.   echo shar: Extracting \"'news.h'\" \(2301 characters\)
  1329.   sed "s/^X//" >'news.h' <<'END_OF_FILE'
  1330. X/*
  1331. X *    (c) Copyright 1990, Kim Fabricius Storm.  All rights reserved.
  1332. X *
  1333. X *    Interface for decoding article headers.
  1334. X */
  1335. X
  1336. Xstruct news_header {
  1337. X
  1338. X    int    ng_flag;    /* flags:            */
  1339. X#      define N_DIGEST 1    /*   article is part of a digest*/
  1340. X#      define N_MODERATED 2    /*   group is moderated        */
  1341. X
  1342. X    off_t    ng_fpos;    /* position of article text    */
  1343. X    off_t    ng_lpos;    /* last text offset
  1344. X                /* header lines:        */
  1345. X    char    *ng_from;    /*   from            */
  1346. X    char    *ng_name;    /*   senders name        */
  1347. X    char    *ng_subj;    /*   subject            */
  1348. X    char    *ng_groups;    /*   newsgroups            */
  1349. X    char    *ng_path;    /*   path            */
  1350. X    char    *ng_reply;    /*   reply-to            */
  1351. X    char    *ng_ident;    /*   message id            */
  1352. X    char    *ng_follow;    /*   followup to        */
  1353. X    char    *ng_ref;    /*   references            */
  1354. X    char    *ng_keyw;    /*   keywords            */
  1355. X    char    *ng_dist;    /*   distibution        */
  1356. X    char    *ng_org;    /*   organization        */
  1357. X    char    *ng_appr;    /*   approved            */
  1358. X    char    *ng_summ;    /*   summary            */
  1359. X
  1360. X    char    *ng_date;    /*   date            */
  1361. X
  1362. X    char    *ng_rdate;    /*   date-received (News 3)    */
  1363. X    char    *ng_bref;    /*   back-references (News 3)    */
  1364. X
  1365. X    char    *ng_xlines;    /*   lines (from header)    */
  1366. X    int    ng_lines;    /*   lines (decoded)        */
  1367. X} news;
  1368. X
  1369. X
  1370. X/*
  1371. X * digest article subheader
  1372. X */
  1373. X
  1374. Xstruct digest_header {
  1375. X    off_t    dg_hpos;    /* position of article header    */
  1376. X    off_t    dg_fpos;    /* position of article text    */
  1377. X    off_t    dg_lpos;    /* last text position        */
  1378. X                /* header lines:        */
  1379. X    char    *dg_date;    /*   date            */
  1380. X    char    *dg_from;    /*   from            */
  1381. X    char    *dg_subj;    /*   subject            */
  1382. X    char    *dg_to;        /*   to                */
  1383. X
  1384. X    int    dg_lines;    /*   lines (pseudo field)    */
  1385. X} digest;
  1386. X
  1387. X
  1388. X#define    NEWS_HEADER_BUFFER    2048
  1389. X
  1390. Xtypedef char    news_header_buffer[NEWS_HEADER_BUFFER];
  1391. X
  1392. X
  1393. XFILE *open_news_article(/* header, modes [, buffer1 [, buffer2]] */);
  1394. X
  1395. X/* modes */
  1396. X
  1397. X#define    FILL_NEWS_HEADER    0x0001    /* parse first header -> buffer1 */
  1398. X#define    FILL_DIGEST_HEADER    0x0002    /* parse second header -> buffer[12] */
  1399. X
  1400. X
  1401. X#define    GET_ALL_FIELDS        0x0010    /* get all fields (otherwise only   */
  1402. X                    /* name, subj, groups, lines        */
  1403. X
  1404. X#define    GET_DATE_ONLY        0x0020    /* get Date field            */
  1405. X
  1406. X#define    FILL_OFFSETS        0x0080    /* fill ng_[hfl]pos */
  1407. X
  1408. X
  1409. X#define    DIGEST_CHECK        0x0100    /* set N_DIGEST if "digest" in subj */
  1410. X                    /* only valid with FILL_NEWS_HEADER */
  1411. X#define LAZY_BODY        0x0200    /* nntp: get body only for digests */
  1412. X
  1413. X
  1414. X#define    SKIP_HEADER        0x1000    /* position after (sub) header */
  1415. X
  1416. END_OF_FILE
  1417.   if test 2301 -ne `wc -c <'news.h'`; then
  1418.     echo shar: \"'news.h'\" unpacked with wrong size!
  1419.   fi
  1420.   # end of 'news.h'
  1421. fi
  1422. if test -f 'nnmail.c' -a "${1}" != "-c" ; then 
  1423.   echo shar: Will not clobber existing file \"'nnmail.c'\"
  1424. else
  1425.   echo shar: Extracting \"'nnmail.c'\" \(1469 characters\)
  1426.   sed "s/^X//" >'nnmail.c' <<'END_OF_FILE'
  1427. X/*
  1428. X *    (c) Copyright 1990, Kim Fabricius Storm.  All rights reserved.
  1429. X *
  1430. X *     nnmail - a mailer that understands @ addressing
  1431. X *         when you don't have sendmail or smail
  1432. X */
  1433. X
  1434. X#include "config.h"
  1435. X
  1436. X#include "options.h"
  1437. X
  1438. Xchar * MAILER = MAILX;
  1439. Xstatic int print_vers, test_mode;
  1440. X
  1441. XOption_Description( mail_options ) {
  1442. X
  1443. X    'v', Bool_Option( print_vers ),
  1444. X    'm', String_Option( MAILER ),
  1445. X    't', Bool_Option( test_mode ),
  1446. X
  1447. X    '\0',
  1448. X};
  1449. X
  1450. X
  1451. Xmain(argc, argv)
  1452. Xint argc;
  1453. Xchar **argv;
  1454. X{
  1455. X    int i, n;
  1456. X    char route[512];
  1457. X    char *getenv(), *envmail;
  1458. X    extern char **environ;
  1459. X
  1460. X    if (envmail = getenv("NNMAILER"))
  1461. X    MAILER = envmail;
  1462. X
  1463. X    n = parse_options(argc, argv, (char *)NULL,
  1464. X              mail_options, (char *)NULL, NULL_FCT);
  1465. X
  1466. X    if (print_vers) {
  1467. X    printf("Release %s\n", version_id);
  1468. X    nn_exit(0);
  1469. X    }
  1470. X
  1471. X#ifndef HAVE_ROUTING
  1472. X    if (test_mode) {
  1473. X    extern FILE *route_trace;
  1474. X    route_trace = stdout;
  1475. X    }
  1476. X#endif
  1477. X
  1478. X    argv[0] = MAILER;
  1479. X
  1480. X#ifndef HAVE_ROUTING
  1481. X    for (i = 1; i <= n; i++)
  1482. X    if (reroute(route, argv[i])) {
  1483. X        if (test_mode) {
  1484. X        printf("%s \t-->  %s\n", argv[i], route);
  1485. X        continue;
  1486. X        }
  1487. X        argv[i] = newstr(strlen(route)+1);
  1488. X        strcpy(argv[i], route);
  1489. X    } else
  1490. X        if (test_mode)
  1491. X        printf("%s \t***  no route found\n", argv[i]);
  1492. X#endif
  1493. X
  1494. X    if (test_mode) nn_exit(0);
  1495. X
  1496. X    execve(MAILER, argv, environ);
  1497. X    fprintf(stderr, "Mailer '%s' not found\n", MAILER);
  1498. X    nn_exit(7);
  1499. X}
  1500. X
  1501. X
  1502. X/*VARARGS*/
  1503. Xuser_error()
  1504. X{
  1505. X}
  1506. X
  1507. Xnn_exit(n)
  1508. X{
  1509. X    exit(n);
  1510. X}
  1511. X
  1512. Xsuspend_nn()
  1513. X{
  1514. X}
  1515. END_OF_FILE
  1516.   if test 1469 -ne `wc -c <'nnmail.c'`; then
  1517.     echo shar: \"'nnmail.c'\" unpacked with wrong size!
  1518.   fi
  1519.   # end of 'nnmail.c'
  1520. fi
  1521. if test -f 'options.h' -a "${1}" != "-c" ; then 
  1522.   echo shar: Will not clobber existing file \"'options.h'\"
  1523. else
  1524.   echo shar: Extracting \"'options.h'\" \(2329 characters\)
  1525.   sed "s/^X//" >'options.h' <<'END_OF_FILE'
  1526. X/*
  1527. X *    (c) Copyright 1990, Kim Fabricius Storm.  All rights reserved.
  1528. X *
  1529. X *    Include file for generic option parsing
  1530. X */
  1531. X
  1532. X/*
  1533. X * To use this routine, you must a table called an Option_Description.
  1534. X * Each element in this table describes one possible option:
  1535. X *    Its option letter
  1536. X *    Its argument type (if any)
  1537. X *    Whether an argument is mandatory or optional
  1538. X *    The address of the variable holding the option value
  1539. X *    The defualt value if argument is optional
  1540. X *
  1541. X * Example:
  1542. X *
  1543. X *    A program accepts the following options:
  1544. X *        -a    [no value]
  1545. X *        -b N    [a numeric value]
  1546. X *        -p [N]    [an optional numeric value]
  1547. X *        -t S    [a string value]
  1548. X *
  1549. X * The corresponding option description table would then look like:
  1550. X *
  1551. X *    #include <options.h>
  1552. X *    int a_flg = 1, b_value = 0, p_value = 0;
  1553. X *    char *t_string = "default";
  1554. X *
  1555. X *    Option_Description( options ) {
  1556. X *        'a', Bool_Option(a_flg),
  1557. X *        'b', Int_Option(b_value),
  1558. X *        'p', Int_Option_Optional(p_value, -1),
  1559. X *        't', String_Option(t_string),
  1560. X *        '\0',
  1561. X *     }
  1562. X * To parse the argument list - and the contents of the environment variable
  1563. X * XXINIT, all that has to be done is to issue the following call:
  1564. X *
  1565. X *    files = parse_options(argc, argv, "XXINIT", options, NULL);
  1566. X *
  1567. X * If no environment variable is associated with the program, use NULL as
  1568. X * the third parameter.
  1569. X *
  1570. X * Upon return, the elements argv[1] .. argv[files] will contain
  1571. X * the file names (and other 'non-options') that occur in the argument list.
  1572. X *
  1573. X * The last NULL argument may be replaced by your own 'usage routine'
  1574. X * which will be called in the following way:
  1575. X *
  1576. X *    usage(pname)
  1577. X *    char *pname; /+ argv[0] without path +/
  1578. X *
  1579. X *
  1580. X * char *program_name(argv)
  1581. X *
  1582. X * return a pointer to the last component of argv[0] (the program name with
  1583. X * with the path deleted).
  1584. X *
  1585. X
  1586. X */
  1587. X
  1588. X
  1589. Xstruct option_descr {
  1590. X    char    option_letter;
  1591. X    char    option_type;
  1592. X    char **    option_address;
  1593. X    char *    option_default;
  1594. X} ;
  1595. X
  1596. X
  1597. X#define    Option_Description(name) \
  1598. X    struct option_descr name[] =
  1599. X
  1600. X#define    Bool_Option(addr) \
  1601. X    1, (char **)(&addr), (char *)0
  1602. X
  1603. X#define    String_Option(addr) \
  1604. X    2, &addr, (char *)0
  1605. X
  1606. X#define String_Option_Optional(addr, default) \
  1607. X    3, &addr, default
  1608. X
  1609. X#define    Int_Option(addr) \
  1610. X    4, (char **)(&addr), (char *)0
  1611. X
  1612. X#define    Int_Option_Optional(addr, default) \
  1613. X    5, (char **)(&addr), (char *)default
  1614. END_OF_FILE
  1615.   if test 2329 -ne `wc -c <'options.h'`; then
  1616.     echo shar: \"'options.h'\" unpacked with wrong size!
  1617.   fi
  1618.   # end of 'options.h'
  1619. fi
  1620. if test -f 'pack_subject.c' -a "${1}" != "-c" ; then 
  1621.   echo shar: Will not clobber existing file \"'pack_subject.c'\"
  1622. else
  1623.   echo shar: Extracting \"'pack_subject.c'\" \(1415 characters\)
  1624.   sed "s/^X//" >'pack_subject.c' <<'END_OF_FILE'
  1625. X/*
  1626. X *    (c) Copyright 1990, Kim Fabricius Storm.  All rights reserved.
  1627. X *
  1628. X *    Pack subject by eliminating RE prefixes and - (nf) suffixes.
  1629. X *    Also collapse multiple blanks into single blanks.
  1630. X */
  1631. X
  1632. X#include "config.h"
  1633. X
  1634. Xpack_subject(dest, src, re_counter_ptr, max_length)
  1635. Xregister char *dest, *src;
  1636. Xint *re_counter_ptr, max_length;
  1637. X{
  1638. X    int re;
  1639. X    char *start_dest;
  1640. X    register char *max_dest;
  1641. X
  1642. X    re = 0;
  1643. X    start_dest = dest;
  1644. X
  1645. X    if (src) {
  1646. X    max_dest = dest + max_length;
  1647. X
  1648. X    while (*src) {
  1649. X        if (isspace(*src)) {
  1650. X        src++;
  1651. X        continue;
  1652. X        }
  1653. X
  1654. X        /* count and remove 'Re: Re: ...' */
  1655. X
  1656. X        if (*src != 'R' && *src != 'r') break;
  1657. X        *dest++ = *src++;
  1658. X
  1659. X        if (*src != 'e' && *src != 'E') break;
  1660. X        *dest++ = *src++;
  1661. X
  1662. X        if (*src == ':' || *src == ' ') {
  1663. X        src++;
  1664. X        dest = start_dest;
  1665. X        re++;
  1666. X        continue;
  1667. X        }
  1668. X
  1669. X        if (*src != '^') break;
  1670. X
  1671. X        src++;
  1672. X        dest = start_dest;
  1673. X
  1674. X        while (isdigit(*src)) *dest++ = *src++;
  1675. X        if (dest == start_dest)
  1676. X        re++;
  1677. X        else {
  1678. X        *dest = NUL;
  1679. X        dest = start_dest;
  1680. X        re += atoi(dest);
  1681. X        }
  1682. X        if (*src == ':') src++;
  1683. X    }
  1684. X
  1685. X    while (*src && dest < max_dest) {
  1686. X        if (*src == '-' && strncmp("- (nf)", src, 5) == 0) break;
  1687. X        if (isascii(*src) && isspace(*src)) {
  1688. X        do src++;
  1689. X        while (isascii(*src) && isspace(*src));
  1690. X        *dest++ = SP;
  1691. X        } else
  1692. X        *dest++ = *src++;
  1693. X    }
  1694. X    }
  1695. X
  1696. X    *dest = NUL;
  1697. X    *re_counter_ptr = (char)re;
  1698. X
  1699. X    return dest - start_dest;
  1700. X}
  1701. END_OF_FILE
  1702.   if test 1415 -ne `wc -c <'pack_subject.c'`; then
  1703.     echo shar: \"'pack_subject.c'\" unpacked with wrong size!
  1704.   fi
  1705.   # end of 'pack_subject.c'
  1706. fi
  1707. if test -f 'proto.h' -a "${1}" != "-c" ; then 
  1708.   echo shar: Will not clobber existing file \"'proto.h'\"
  1709. else
  1710.   echo shar: Extracting \"'proto.h'\" \(1061 characters\)
  1711.   sed "s/^X//" >'proto.h' <<'END_OF_FILE'
  1712. X/*
  1713. X *    (c) Copyright 1990, Kim Fabricius Storm.  All rights reserved.
  1714. X *
  1715. X *    Master/slave communication and locking.
  1716. X */
  1717. X
  1718. X/*
  1719. X *    proto_lock() modes
  1720. X */
  1721. X
  1722. X#define PL_SET        1    /* set lock (if not set) */
  1723. X#define PL_SET_WAIT    2    /* set lock (wait until set) */
  1724. X#define PL_SET_QUICK    3    /* as _WAIT, but using sleep(1) */
  1725. X#define PL_CLEAR    4    /* clear lock */
  1726. X#define PL_CLEAR_WAIT    5    /* wait for lock to disappear */
  1727. X#define PL_CHECK    6    /* check running status */
  1728. X#define PL_WAKEUP    7    /* send wakeup (must succeed) */
  1729. X#define PL_WAKEUP_SOFT    8    /* send wakeup (may fail) */
  1730. X#define PL_TERMINATE    9    /* send termination */
  1731. X#define PL_TRANSFER    10    /* transfer lock to current process (forked) */
  1732. X
  1733. X/*
  1734. X * types for send_master(type, group, opt, arg)
  1735. X */
  1736. X
  1737. X#define SM_SET_OPTION    'O'    /* set option to arg (toggle if -1) */
  1738. X#define SM_SET_FLAG    'F'    /* opt=set/clear flag 'arg' in group */
  1739. X#define SM_RECOLLECT    'R'    /* recollect group (or all groups if NULL) */
  1740. X#define SM_EXPIRE    'X'    /* expire group (or all groups if NULL) */
  1741. X#define SM_SCAN_ONCE    'U'    /* scan unconditionally (ignore active) */
  1742. END_OF_FILE
  1743.   if test 1061 -ne `wc -c <'proto.h'`; then
  1744.     echo shar: \"'proto.h'\" unpacked with wrong size!
  1745.   fi
  1746.   # end of 'proto.h'
  1747. fi
  1748. if test -f 'routes.sample' -a "${1}" != "-c" ; then 
  1749.   echo shar: Will not clobber existing file \"'routes.sample'\"
  1750. else
  1751.   echo shar: Extracting \"'routes.sample'\" \(1952 characters\)
  1752.   sed "s/^X//" >'routes.sample' <<'END_OF_FILE'
  1753. X# This file is read from the beginning until a match for a specific
  1754. X# domain/site pair is found.  Initially all lines applies to all
  1755. X# domains and hosts.  (NOTICE: we use domain == top-level domain)
  1756. X#
  1757. X# In the following list of requests, <host name> is the name of the
  1758. X# LOCAL host, <domain> and <site> is the receivers domain and site.
  1759. X#
  1760. X#    /L <domain>    local domain name(s), implies /D <domain> command
  1761. X#    /H <local host>    following lines only applies to specified local host
  1762. X#    /H        following lines applies to all hosts
  1763. X#    /N <site>    site is neighbour to local host (+prefix)
  1764. X#    /D <domain>    following lines applies to specified domain only
  1765. X#    /D        following lines applies to all domains
  1766. X#    /P <prefix>    <prefix> is prefixed to the generated address
  1767. X#    /B <pattern>    address to use for multi-hop bang addresses
  1768. X#    /G <pattern>    default address pattern
  1769. X#    <site> <pattern> address patterns used to reach given site
  1770. X#
  1771. X# The <domain>, <host>, and <site> specifications can be a comma-separated
  1772. X# list of domain, host, or site names (without spaces).
  1773. X#
  1774. X# Address patterns are copied directly to the generated address, except
  1775. X# that the following sequences are substituted:
  1776. X#    %n    name of receiver
  1777. X#    %s    receiver's site (with top-level domain stripped off)
  1778. X#    %d    receiver's top-level domain
  1779. X#    %b    first N-1 sites from N multi-hop bang address
  1780. X#    %p    drop <preix> if one is specified
  1781. X#    %%    a % character
  1782. X#
  1783. X# Default rules:
  1784. X#    %n@local-host.local-domain -> %p%n
  1785. X#    %n@neighbour-host.remote-domain -> %s.%d!%n
  1786. X#
  1787. X# Example configuration (AmbraSoft A/S, September 1987):
  1788. X#
  1789. X# Backbone:              dkuug.dk
  1790. X#                |
  1791. X# In-house:    olamb.dk---- ambush.dk ------ ambra.dk
  1792. X#              /    |   \
  1793. X# Direct:          oldk1.dk oldk2.dk  olgb1.uucp(=olgb1.oliv.co.uk)
  1794. X#
  1795. X# This file can be used unchanged on all in-house systems.
  1796. X
  1797. X/L dk,uucp
  1798. X
  1799. X/H ambra,olamb
  1800. X/N ambush
  1801. X/P         ambush!
  1802. X
  1803. X/H
  1804. X/N dkuug
  1805. X/N ambra,olamb
  1806. X/N oldk1,oldk2
  1807. X
  1808. X/L uucp
  1809. X/N olgb1
  1810. X
  1811. X/D uk
  1812. Xolgb1.oliv.co    olgb1!%n
  1813. X
  1814. X/D
  1815. X
  1816. X/P+        dkuug!
  1817. X
  1818. X/B        %b!%s!%n
  1819. X/G        %s.%d!%n
  1820. END_OF_FILE
  1821.   if test 1952 -ne `wc -c <'routes.sample'`; then
  1822.     echo shar: \"'routes.sample'\" unpacked with wrong size!
  1823.   fi
  1824.   # end of 'routes.sample'
  1825. fi
  1826. if test -f 'term.h' -a "${1}" != "-c" ; then 
  1827.   echo shar: Will not clobber existing file \"'term.h'\"
  1828. else
  1829.   echo shar: Extracting \"'term.h'\" \(1313 characters\)
  1830.   sed "s/^X//" >'term.h' <<'END_OF_FILE'
  1831. X/*
  1832. X *    (c) Copyright 1990, Kim Fabricius Storm.  All rights reserved.
  1833. X *
  1834. X *    Terminal interface definitions.
  1835. X */
  1836. X
  1837. X
  1838. X
  1839. Xextern init_term();
  1840. Xextern home();
  1841. Xextern gotoxy();
  1842. Xextern clrdisp(), clrpage();
  1843. Xextern clrline();
  1844. X
  1845. Xextern so_gotoxy(), so_printf(), so_end();
  1846. X
  1847. Xextern no_raw(), raw(), unset_raw();
  1848. X
  1849. Xextern int Lines, Columns;
  1850. Xextern int cookie_size;
  1851. Xextern int WRAP, STANDOUT;
  1852. X
  1853. Xextern char *get_s();
  1854. X
  1855. X#define    NONE        (char *)NULL /* no default string etc. */
  1856. X
  1857. X#define    GET_S_BUFFER    256     /* if caller want to reuse get_s buffer */
  1858. X
  1859. Xextern get_c();
  1860. X
  1861. X/* special keys returned by get_c() */
  1862. X
  1863. X#define    K_interrupt    CONTROL_('G')
  1864. X
  1865. X#define    K_up_arrow    0x0081
  1866. X#define    K_down_arrow    0x0082
  1867. X#define K_left_arrow    0x0083
  1868. X#define K_right_arrow    0x0084
  1869. X
  1870. X#define    K_function(n)    (0x0085 + n)
  1871. X
  1872. X
  1873. X#define    GETC_COMMAND    0x4000    /* bit set by get_c to return a command */
  1874. X
  1875. X
  1876. X/*
  1877. X *    prompt_line = ...
  1878. X *    prompt( [P_COMMAND], ] [ format [, arg1 ... , arg4] ] );
  1879. X *
  1880. X *    P_MOVE:        just move to prompt line
  1881. X *    P_REDRAW:    redraw prompt
  1882. X *      P_VERSION:    print version on prompt line
  1883. X */
  1884. X
  1885. X
  1886. Xextern prompt();
  1887. X
  1888. Xint prompt_line;    /* prompt line */
  1889. X
  1890. X#define    P_MOVE        (char *)1
  1891. X#define P_REDRAW    (char *)5
  1892. X#define    P_VERSION    (char *)9
  1893. X#define P_SAVE        (char *)13
  1894. X#define P_RESTORE    (char *)17
  1895. X
  1896. Xextern display_file();
  1897. X
  1898. X#define    CLEAR_DISPLAY    0x01
  1899. X#define    CONFIRMATION    0x02
  1900. END_OF_FILE
  1901.   if test 1313 -ne `wc -c <'term.h'`; then
  1902.     echo shar: \"'term.h'\" unpacked with wrong size!
  1903.   fi
  1904.   # end of 'term.h'
  1905. fi
  1906. if test -f 'vararg.h' -a "${1}" != "-c" ; then 
  1907.   echo shar: Will not clobber existing file \"'vararg.h'\"
  1908. else
  1909.   echo shar: Extracting \"'vararg.h'\" \(1183 characters\)
  1910.   sed "s/^X//" >'vararg.h' <<'END_OF_FILE'
  1911. X/*
  1912. X *    (c) Copyright 1990, Kim Fabricius Storm.  All rights reserved.
  1913. X *
  1914. X *     Semi-faked varargs feature
  1915. X */
  1916. X
  1917. X#ifdef HAVE_VARARGS
  1918. X#undef NO_VARARGS
  1919. X#endif
  1920. X
  1921. X#ifdef NO_VARARGS
  1922. X
  1923. X#define va_alist    zZa, zZb, zZc, zZd, zZe, zZf, zZg, zZh
  1924. X#define va_dcl        char *zZa, *zZb, *zZc, *zZd, *zZe, *zZf, *zZg, *zZh;
  1925. X
  1926. X#define va_arg1(type)    (type)zZa
  1927. X#define va_arg2(type)    (type)zZb
  1928. X#define va_arg3(type)    (type)zZc
  1929. X#define va_args1toN    zZa, zZb, zZc, zZd, zZe, zZf, zZg, zZh
  1930. X#define va_args2toN    zZb, zZc, zZd, zZe, zZf, zZg, zZh
  1931. X#define va_args3toN    zZc, zZd, zZe, zZf, zZg, zZh
  1932. X#define va_args4toN    zZd, zZe, zZf, zZg, zZh
  1933. X
  1934. X#define vsprintf    sprintf
  1935. X#define vprintf        printf
  1936. X
  1937. X#define use_vararg
  1938. X#define start_vararg
  1939. X#define end_vararg
  1940. X
  1941. X#define va_tail        va_alist
  1942. X#define va_tdcl        va_dcl
  1943. X
  1944. X#else
  1945. X
  1946. X#include <varargs.h>
  1947. X
  1948. X#define va_tail        zZap
  1949. X#define    va_tdcl        va_list va_tail;
  1950. X
  1951. X#define use_vararg    va_list zZap
  1952. X#define start_vararg    va_start(zZap)
  1953. X#define end_vararg    va_end(zZap)
  1954. X
  1955. X#define va_arg1(type)    va_arg(zZap, type)
  1956. X#define va_arg2(type)    va_arg(zZap, type)
  1957. X#define va_arg3(type)    va_arg(zZap, type)
  1958. X#define va_args1toN    zZap
  1959. X#define va_args2toN    zZap
  1960. X#define va_args3toN    zZap
  1961. X#define va_args4toN    zZap
  1962. X
  1963. X#endif
  1964. X
  1965. X
  1966. END_OF_FILE
  1967.   if test 1183 -ne `wc -c <'vararg.h'`; then
  1968.     echo shar: \"'vararg.h'\" unpacked with wrong size!
  1969.   fi
  1970.   # end of 'vararg.h'
  1971. fi
  1972. echo shar: End of archive 21 \(of 22\).
  1973. cp /dev/null ark21isdone
  1974. MISSING=""
  1975. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ; do
  1976.     if test ! -f ark${I}isdone ; then
  1977.     MISSING="${MISSING} ${I}"
  1978.     fi
  1979. done
  1980. if test "${MISSING}" = "" ; then
  1981.     echo You have unpacked all 22 archives.
  1982.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1983. else
  1984.     echo You still must unpack the following archives:
  1985.     echo "        " ${MISSING}
  1986. fi
  1987. exit 0
  1988.  
  1989. exit 0 # Just in case...
  1990.